#include "FKVisualInterfaceView.h"

#include "FKLogger.h"

FKVisualInterfaceView::FKVisualInterfaceView(QString source, QWindow* parent):QQuickView(parent),_source(source){
    FK_CBEGIN
    setResizeMode(SizeRootObjectToView);
    FK_CEND
}

FKVisualInterfaceView::~FKVisualInterfaceView(){
    FK_DBEGIN
    FK_DEND
}

void FKVisualInterfaceView::loadFromqrc(QString path){
//    setSource(QUrl(path.prepend("C:/Qt/Tools/QtCreator/bin/fkframework/FKVisualInterface/")));
    setSource(QUrl(path.prepend("qrc:///")));
}

void FKVisualInterfaceView::resizeEvent(QResizeEvent *ev){
    QQuickView::resizeEvent(ev);
    emit resized(ev->size());
}
